package main

import (
	"github.com/gin-contrib/sessions"
	"github.com/gin-contrib/sessions/redis"
	"github.com/gin-gonic/gin"
	"html/template"
	"syudy/Models"
	"syudy/route/admin"
)

func main() {
	r := gin.Default()
	store, _ := redis.NewStore(1, "tcp", "172.16.251.241:30956", "", "wowjoy", []byte("secret111"))
	r.Use(sessions.Sessions("mysession", store))
	r.FuncMap = template.FuncMap{
		"UnixToTime": Models.UnixToTime,
	}
	admin.LoginRoute(r)
	r.Run()

}
